#include<stdio.h>
#include<unistd.h>
#include<sys/types.h>
#include<sys/stat.h>
#include<fcntl.h>

int main()
{
  close(1);
  int fd = open("log.txt",O_CREAT | O_WRONLY | O_APPEND,0666);

  printf("hello,world\n");

  close(fd);

  return 0;
}
